//
// Created by Administrator on 2024/3/11.
//

#include<bits/stdc++.h>

using namespace std;
using ll = long long;
#define endl '\n'

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
    stack<double> S;

    string w;
    while (cin >> w) {
        double x;
        istringstream iss(w);
        if (iss >> x) {
            S.push(x);
        } else {
            double b = S.top();
            S.pop();
            double a = S.top();
            S.pop();
            switch (w[0]) {
                case '+':
                    S.push(a + b);
                    break;
                case '-':
                    S.push(a - b);
                    break;
                case '*':
                    S.push(a * b);
                    break;
                case '/':
                    S.push(a / b);
                    break;
            }
        }
    }
    cout << fixed << setprecision(2) << S.top();

    return 0;
}